﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace d39
{
    public partial class WallTerrainList : GridControl
    {
        protected override void UpdateFromGrid(bool playersOrMovesChanged, bool wallTerrainChanged)
        {
            if (wallTerrainChanged)
            {
                UpdatePanel.Update();
                Walls.DataSource = CurrentGrid.WallTypes.Where(wall => wall.Description != null);
                Terrains.DataSource = CurrentGrid.TerrainTypes.Where(terrain => terrain.Description != null);
                DataBind();
            }
        }
    }
}